package com.xw.service.xw.image;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xw.dao.DaoSupport;
import com.xw.util.PageData;

/**
 * 类描述: 病历单图片业务类
 * @author : gce
 * @date   : 2017-12-11
 */
@Service("imageService")
public class ImageService {
	
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**
	 * 添加病历单图片
	 * @param pd
	 * @throws Exception
	 * @return: int
	 * @author: gce
	 * @date  : 2017-12-11
	 */
	public int save(PageData pd) throws Exception{
		return (int)dao.save("ImageMapper.save", pd);
	}
	
	/**
	 * 查询图片集合，根据病历单ID(id)
	 * @param pd
	 * @throws Exception
	 * @return: List<PageData>
	 * @author: gce
	 * @date  : 2017-12-11
	 */
	public List<PageData> listByCaseId(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("ImageMapper.listByCaseId", pd);
	}

}
